<!--
See http://developer.yahoo.com/ypatterns/pattern.php?pattern=itempagination
-->
<?php
$registry = Zend_Registry::getInstance();
$translator = $registry->get('Zend_Translate');
?>
<?php if ($this->pageCount): ?>
<div class="paginationControl">
<div class="paginationControlLeft"><input name="back" id="back"
	type="button" onclick="javascript: history.go(-1);"
	value="<?php echo $this->translate("Back");?>" /></div>
<div class="paginationControlMiddle">
<?= $this->firstItemNumber; ?> - <?= $this->lastItemNumber; ?>
/ <?= $this->totalItemCount; ?> <!-- First page link --> <?php if (isset($this->previous)): ?>
<a href="<?= $this->url(array('page' => $this->first)); ?>"> <?php echo $translator->translate("First");?>
</a> | <?php else: ?> <span class="disabled"><?php echo $translator->translate("First");?></span>
| <?php endif; ?> <!-- Previous page link --> <?php if (isset($this->previous)): ?>
<a href="<?= $this->url(array('page' => $this->previous)); ?>"> <?php echo $translator->translate("Previous");?>
</a> | <?php else: ?> <span class="disabled"><?php echo $translator->translate("Previous");?></span>
| <?php endif; ?> <!-- Next page link --> <?php if (isset($this->next)): ?>
<a href="<?= $this->url(array('page' => $this->next)); ?>"> <?php echo $translator->translate("Next");?>
</a> | <?php else: ?> <span class="disabled"><?php echo $translator->translate("Next");?></span>
| <?php endif; ?> <!-- Last page link --> <?php if (isset($this->next)): ?>
<a href="<?= $this->url(array('page' => $this->last)); ?>"> <?php echo $translator->translate("Last");?>
</a> <?php else: ?> <span class="disabled"><?php echo $translator->translate("Last");?></span>
<?php endif; ?>
</div>
<div class="paginationControlRight">
	<select id="paginationDropdownControl" size="1">
		<?php foreach ($this->pagesInRange as $page): ?>
		<?php $selected = ($page == $this->current) ? ' selected="selected"' : ''; ?>
		<option value="<?= $this->url(array('page' => $page)); ?>"
		<?= $selected ?>><?= $page; ?></option>
		<?php endforeach; ?>
	</select>
</div>
</div>
<?php endif; ?>
 <script type="text/javascript"
	src="http://ajax.googleapis.com/ajax/libs/prototype/1.6.0.2/prototype.js">
</script> <script type="text/javascript">
$('paginationDropdownControl').observe('change', function() {
    window.location = this.options[this.selectedIndex].value;
})
</script>

